/**
 * CS575 Software Design
 * Group 6
 * Group Members: Anthony Davidson, Kendra Scheesley, Lyndsey Whitman, Stephen Zakrewsky
 * Date: May 19, 2012
 * Main Author(s): Lyndsey Whitman
 */

package edu.drexel.cs575.a3;

import edu.drexel.cs575.a3.location.LocaleEnum;
import edu.drexel.cs575.a3.location.Location;
import edu.drexel.cs575.a3.location.LocationProvider;

public class Price extends CalculatePrice
{

	public Price()
	{
		
	}
	
	@Override
	public double calculatePrice(double mass, double pricePerMassUnit)
	{
		// This is in US dollars
		double price = mass * pricePerMassUnit;
		
		// convert the price to the currency for this Locale
		Location location = LocationProvider.getInstance().getLocation();
		LocaleEnum locale = location.getLocaleEnum();
		price = ConvertCurrency.getInstanceForLocale(locale).convertCurrency(price);
		
		return price;
	}

}
